home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #4 / K-CD-4-2002.ISO / Namo WebEditor / data1.cab / Eng_Program_Executable_Files_Compact / lib / Script / action.js next >
Encoding:
JavaScript  |  2001-10-21  |  45.4 KB  |  1,363 lines

  1. // Namo WebEditor action script
  2. // 5.1
  3.  
  4. function na_change_img_src(name, nsdoc, rpath, preload)
  5. // Replace Image
  6. // img, a, layer, button, timeline
  7. // 'Original image name' IMG, '' NSDOC, 'Replacement image path' FILE gif, 'Preload replacement image' PRELOADBOOL
  8. // Swaps one image for another by changing the SRC attribute of the IMG tag.
  9.   var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  10.   if (name == '')
  11.     return;
  12.   if (img) {
  13.     img.altsrc = img.src;
  14.     img.src    = rpath;
  15.   } 
  16. }
  17.  
  18. function na_restore_img_src(name, nsdoc)
  19. // Restore Image
  20. // img, a, layer, button, timeline
  21. // 'Image name' IMG, '' NSDOC
  22. // Restores the last set of swapped images to their previous source files.
  23. {
  24.   var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  25.   if (name == '')
  26.     return;
  27.   if (img && img.altsrc) {
  28.     img.src    = img.altsrc;
  29.     img.altsrc = null;
  30.   } 
  31. }
  32.  
  33. function na_call(str)
  34. // Call JavaScript Function
  35. // body, img, a, select, text, button, file, textarea, timeline, layer
  36. // 'Function' TEXT
  37. // Calls the JavaScript Function you specify.
  38. {
  39.   eval(str);
  40. }
  41.  
  42. function na_check_browser(nsurl, otherurl, framestr)
  43. // Redirect by Browser
  44. // body, img, a, select, button, timeline
  45. // 'Netscape URL' FILE htm html, 'Explorer URL' FILE htm html, 'Target Frame' FRAME
  46. // Redirects the visitor according to the browser type.
  47. {
  48.   var url = (navigator.appName.indexOf('Netscape', 0) != -1) ? nsurl : otherurl;
  49.   if (framestr == 'blank') {
  50.     window.open(url, 'win1');
  51.   } else {
  52.     var frameobj = eval(framestr);
  53.     frameobj.location = url;
  54.   }
  55. }
  56.  
  57. function na_check_plugin(plugin, pnsurl, nsurl, framestr)
  58. // Check Plugin Installation
  59. // body, img, a, select, button, timeline
  60. // 'Plugin name' TEXT 'Shockwave Flash', 'Plugin exists URL' TEXT http://, 'No plugin URL' TEXT http://, 'Target frame' FRAME
  61. // Checks if the specific plugin is installed, and redirects the visitor accordingly (Netscape Navigator Compatible).
  62. {
  63.   var url;
  64.   if (navigator.plugins && navigator.plugins[plugin])
  65.     url = pnsurl;
  66.   else
  67.     url = nsurl ;
  68.   if (framestr == 'blank') {
  69.     window.open(url, 'win1');
  70.   } else {
  71.     var frameobj = eval(framestr);
  72.     frameobj.location = url;
  73.   }
  74. }
  75.  
  76. function na_show_layer(lname)
  77. // Show Layer
  78. // img, a, layer, select, button, timeline
  79. // 'Target layer' LAYER 
  80. // Shows layer.
  81. {
  82.  if (lname == '') return;
  83.  
  84.  var layer  = document.all ? document.all(lname).style : document.layers[lname];
  85.  var show  = document.all ? 'visible' : 'show';
  86.  var hide  = document.all ? 'hidden' : 'hide';
  87.  
  88.  if (na_show_layer.arguments.length <= 1)
  89.   layer.visibility = show;
  90.  else
  91.   layer.visibility = (na_show_layer.arguments[1] == 0 ? show : hide);
  92. }
  93.  
  94. function na_hide_layer(lname)
  95. // Hide Layer
  96. // img, a, layer, select, button, timeline
  97. // 'Target layer' LAYER 
  98. // Hides layer.
  99. {
  100.   if (document.layers)
  101.     document.layers[lname].visibility = 'hide'    
  102.   if(document.all)
  103.     document.all(lname).style.visibility = 'hidden' 
  104. }
  105.  
  106. function na_alert(str)
  107. // Popup Message
  108. // body, img, a, select, button, timeline
  109. // 'Message text' TEXT
  110. // Shows a message in a pop up window.
  111. {
  112.   alert(str);
  113. }
  114.  
  115. function na_preload_img()
  116. // Preload Image
  117. // body
  118. // '' CONST true, 'Image path' FILE
  119. // Loads the image when the window opens, even if it's not called.
  120.   var img_list = na_preload_img.arguments;
  121.   if (document.preloadlist == null) 
  122.     document.preloadlist = new Array();
  123.   var top = document.preloadlist.length;
  124.   for (var i=0; i < img_list.length; i++) {
  125.     document.preloadlist[top+i] = new Image;
  126.     document.preloadlist[top+i].src = img_list[i+1];
  127.   } 
  128. }
  129.  
  130. function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
  131. // Open URL
  132. // body, img, a, button, layer, timeline 
  133. // 'Window name' TEXT win1, 'URL' FILE htm html, 'X coordinate' NUM 100 0 2000, 'Y coordinate' NUM 100 0 2000, 'Width' NUM 300 100 10000, 'Height' NUM 200 50 10000, 'Show toolbar' NUMCOMBO No Yes, 'Show menu bar' NUMCOMBO No Yes, 'Show status bar' NUMCOMBO No Yes, 'Show scroll bars' NUMCOMBO No Yes, 'Resizable' NUMCOMBO No Yes
  134. // Opens a URL in a new window. 
  135. {
  136.   toolbar_str = toolbar ? 'yes' : 'no';
  137.   menubar_str = menubar ? 'yes' : 'no';
  138.   statusbar_str = statusbar ? 'yes' : 'no';
  139.   scrollbar_str = scrollbar ? 'yes' : 'no';
  140.   resizable_str = resizable ? 'yes' : 'no';
  141.   window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
  142. }
  143.  
  144. function na_set_status_msg(msg)
  145. // Insert Text in Status Bar
  146. // body, img, a, button, layer, timeline
  147. // 'Message text' TEXT
  148. // Shows a message in the status bar.
  149. {
  150.   status = msg;
  151. }
  152.  
  153. function na_tm_gotoframe(name, frame, count, gotoID)
  154. // Go to Time Line Frame
  155. // body, img, a, button, layer, timeline
  156. // 'Time Line name' TIMELINE, 'Frame number' NUM 1 1 1000, 'Limit of repetitions' NUM 1 -1 100000, '' IDSTRING
  157. // Plays a Time Line beginning at the specified frame.
  158. {
  159.     var tm, bar, layer, prop_tbl, prop_name, prop_value, n_bar, n_prop;
  160.     var frame, nkeyfrm, startfrm, endfrm, f, kf, i, j, back;
  161.     var ns = navigator.appName.indexOf('Netscape', 0) != -1;
  162.  
  163.     if (document.NamoTime == null)              NamoTime_Init();
  164.     if ((tm = document.NamoTime[name]) == null) return;
  165.  
  166.     if (tm.gotoCount == null)         tm.gotoCount = new Array(10);
  167.     if (tm.gotoCount[gotoID] == null) tm.gotoCount[gotoID] = count;
  168.     if (tm.gotoCount[gotoID] == 0)    return;
  169.     if (tm.gotoCount[gotoID] > 0)     tm.gotoCount[gotoID]--;
  170.  
  171.     if (tm.actions) {
  172.         for (i=0; i < tm.actions[0].length && tm.actions[0][i] <= frame; i++)
  173.             if (tm.actions[0][i] == frame) eval(tm.actions[1][i]);
  174.     }
  175.  
  176.     back        = (frame < tm.curframe);
  177.     n_bar       = tm.length;
  178.     for (i=0; i < n_bar; i++) {
  179.         if ((bar = tm[back ? n_bar-1-i : i]) == null) continue;
  180.  
  181.         nkeyfrm  = bar.keyframes.length;
  182.         startfrm = bar.keyframes[0];
  183.         endfrm   = bar.keyframes[nkeyfrm-1];
  184.         if ((back == false && frame < startfrm) || (back && frame > endfrm)) continue;
  185.         f        = Math.min(Math.max(0, frame - startfrm), endfrm);
  186.         for (kf=j=0; j < bar.keyframes.length-1 && bar.keyframes[j] <= frame; kf = j++) ;
  187.  
  188.         if (bar.props == null) continue;
  189.         n_prop = bar.props.length;
  190.  
  191.         layer = bar.layer;
  192.         if (layer == null) continue;
  193.  
  194.         for (j=0; j < n_prop; j++) {
  195.              prop_tbl   = bar.props[j];
  196.              prop_name  = prop_tbl.prop;
  197.  
  198.              prop_value = prop_tbl[(bar.keyframes.length < prop_tbl.length) ? f : kf];
  199.              if (ns) layer[prop_name]       = prop_value;
  200.              else    layer.style[prop_name] = prop_value;
  201.         }
  202.     }
  203.     if (tm.curframe == 0 || tm.pause) setTimeout('NamoTime_Play(\''+name+'\')', tm.delay);
  204.     tm.curframe = frame;
  205. }
  206.  
  207. function na_tm_play(name)
  208. // Play Time Line
  209. // body, img, a, button, layer, timeline
  210. // 'Time Line name' TIMELINE
  211. // Plays a Time Line. 
  212. {
  213.   var tm;
  214.   if (document.NamoTime == null) NamoTime_Init();
  215.   if ((tm = document.NamoTime[name]) == null) return;
  216.   if (tm.curframe == 0 || tm.pause) setTimeout('NamoTime_Play(\''+name+'\')', tm.delay);
  217.   tm.pause = false;
  218. }
  219.  
  220. function na_tm_pause(name)
  221. // Stop Time Line
  222. // body, img, a, button, layer, timeline
  223. // 'Time Line name' TIMELINE
  224. // Stops a Time Line. 
  225. {
  226.   var tm;
  227.   if (document.NamoTime == null) NamoTime_Init();
  228.   if ((tm = document.NamoTime[name]) == null) return;
  229.   tm.pause = true;
  230. }
  231.  
  232. function na_move_layer(lname, x, y)
  233. // Move Layer to
  234. // img, a, select, layer 
  235. // 'Target Layer' LAYER, 'X Coordinate' NUM 100, 'Y Coordinate' NUM 100
  236. // Moves layer to the position you specify.
  237. {
  238.   if (document.layers)
  239.     document.layers[lname].moveTo(x,y)   
  240.   if (document.all)
  241.     document.all(lname).style.pixelTop=y   
  242.     document.all(lname).style.pixelLeft=x  
  243.   if (document.getElementById)
  244.     document.getElementById(lname).style.pixelTop=y   
  245.     document.getElementById(lname).style.pixelLeft=x  
  246. }
  247.  
  248. function na_move_by_layer(lname, offsetx, offsety)
  249. // Move Layer by
  250. // a, img, select, layer
  251. // 'Target Layer' LAYER, 'Offset X' NUM 10, 'Offset Y' NUM 10
  252. // Moves layer by the amount of offset you specify.
  253. {
  254.   if (document.getElementById) {
  255.     var oj = document.getElementById(lname).style
  256.     oj.left = parseInt(oj.left) + offsetx
  257.     oj.top  = parseInt(oj.top) + offsety
  258.   }
  259.   else if (document.layers)
  260.     document.layers[lname].moveBy(offsetx,offsety)
  261.   else if (document.all) {
  262.     var oj = document.all(lname).style
  263.     oj.pixelLeft += offsetx
  264.     oj.pixelTop += offsety
  265.   }
  266. }
  267.  
  268. function na_slide_layers(lname, startX, startY, endX, endY, speed, stpx) {
  269. // Glide Layer 
  270. // a, img, select, layer 
  271. // 'Target Layer' LAYER, 'Start X' NUM, 'Start Y' NUM, 'End X' NUM, 'End Y' NUM, 'Speed' NUM 10, 'Step' NUM 10
  272. // Moves layer to a user-specified position at the speed you desire.
  273.   if (! document.count) {
  274.     document.wx = new Array();
  275.     document.wy = new Array();
  276.     document.ex = new Array();
  277.     document.ey = new Array();
  278.     document.spd = new Array();
  279.     document.step = new Array();
  280.     document.stepX = new Array();
  281.     document.stepY = new Array();
  282.     document.mvFlag = new Array();
  283.     document.slideID = new Array();
  284.     document.count = new Array();
  285.    }
  286.     
  287.   if (!document.mvFlag[lname]) {
  288.     clearTimeout(document.slideID[lname]);
  289.     document.count[lname] = 0;           
  290.     var ofX = (endX - startX); 
  291.     var ofY = (endY - startY);    
  292.     document.step[lname] = Math.max(Math.abs(ofX), Math.abs(ofY))/stpx ;
  293.     document.stepX[lname] = ofX/document.step[lname];  
  294.     document.stepY[lname] = ofY/document.step[lname];  
  295.     document.wx[lname] = startX;  
  296.     document.wy[lname] = startY;        
  297.     document.ex[lname] = endX;           
  298.     document.ey[lname] = endY;           
  299.     document.spd[lname] = speed;
  300.     document.mvFlag[lname] = true;
  301.     }
  302.   if (document.mvFlag[lname] && (document.count[lname] <= document.step[lname]-1)){
  303.      document.count[lname]++
  304.      document.wx[lname] += document.stepX[lname];
  305.      document.wy[lname] += document.stepY[lname];
  306.      clearTimeout(document.slideID[lname]);
  307.      document.slideID[lname] =  setTimeout('na_slide_layers("'+lname+'")', document.spd[lname]);
  308.    }
  309.   else {
  310.     
  311.     document.wx[lname] = document.ex[lname];
  312.     document.wy[lname] = document.ey[lname];
  313.     clearTimeout(document.slideID[lname]);
  314.     document.mvFlag[lname] = false;
  315.   }
  316.     
  317.   if (document.layers)
  318.     document.layers[lname].moveTo(document.wx[lname],document.wy[lname]);
  319.   if (document.all)
  320.     document.all(lname).style.posLeft = document.wx[lname];
  321.   if (document.all) 
  322.     document.all(lname).style.posTop = document.wy[lname];
  323. }
  324.  
  325. function na_set_clip (lname, clipTop, clipLeft, clipRight, clipBottom)
  326. // Clip Layer
  327. // body, img, a, select, button, timeline, layer 
  328. // 'Target Layer' LAYER, 'Top' NUM, 'Left' NUM, 'Right' NUM, 'Bottom' NUM
  329. // Clips off a portion of layer. Specify 4 lines that trims off the layer.
  330. {
  331.   if (document.layers) {
  332.    with(document.layers[lname].clip)
  333.     { 
  334.       top = clipTop;
  335.       right = clipRight;
  336.       bottom = clipBottom;
  337.       left = clipLeft
  338.     }
  339.   }
  340.   if (document.all)
  341.     document.all(lname).style.clip = 'rect('+clipTop+','+clipRight+','+clipBottom+','+clipLeft+')'
  342.  
  343. function na_zindex_layer(lname, zindex)
  344. // Set Z-Index  
  345. // img, a, select, button, timeline, layer 
  346. // 'Target Layer' LAYER, 'Z-Index' NUM 1
  347. // Set Z-Index, which decides the stacking row of layers. Higher the number, upper it's placed.
  348. {
  349.   if (document.layers)
  350.     document.layers[lname].zIndex = zindex  
  351.   if (document.all)
  352.     document.all(lname).style.zIndex = zindex  
  353.  if (document.getElementById)
  354.     document.getElementById(lname).style.zIndex = zindex   
  355. }
  356.  
  357. function na_set_bgcolor_layer(lname, color)
  358. // Set Background Color of Layer
  359. // img, a, select, button, timeline, layer  
  360. // 'Target Layer' LAYER, 'Color' COLOR #FFFFFF
  361. // Sets the background color of the layer.
  362. {  
  363.   if (document.layers)
  364.     document.layers[lname].bgColor = color  
  365.   if (document.all)
  366.     document.all(lname).style.backgroundColor = color  
  367.   if (document.getElementById)
  368.     document.getElementById(lname).style.backgroundColor = color  
  369.  
  370. function na_set_background_image_layer(lname, src)
  371. // Set Background Image of Layer
  372. // img, a, select, button, timeline, layer 
  373. // 'Target Layer' LAYER, 'Image' FILE 
  374. // Changes the background image of a layer.
  375.  
  376. {
  377.   ns4 = (document.layers)? true:false
  378.   ie4 = (document.all)? true:false
  379.   ns6 = (document.getElementById)? true:false
  380.   
  381.   if (ns4)
  382.     document.layers[lname].background.src = src;  
  383.   if (document.all)
  384.     document.all(lname).style.backgroundImage = "url(" + src + ")";  
  385.   if (ns6)
  386.     document.getElementById(lname).style.backgroundImage = "url(" + src + ")";  
  387.  
  388. function na_write_to_layer(lname, str, color, size, font, style, weight)
  389. // Insert Text to Layer
  390. // img, a, select, button, timeline, layer 
  391. // 'Target Layer' LAYER, 'Message' TEXT, 'Font Color' COLOR #000000, 'Font Size (pt)' NUM 12, 'Font' FONT, 'Font Style' TEXTCOMBO 'normal' 'italic' 'oblique', 'Font Weight' TEXTCOMBO 'normal' 'bold' 'bolder' 'lighter' 100 200 300 400 500 600 700 800 900  
  392. // Inserts text to the designated layer.
  393. {
  394. if (document.layers) { 
  395.   with(document.layers[lname]) {
  396.     document.open()
  397.     document.write(str)
  398.     document.fgColor = color
  399.     document.close();
  400.    }
  401.   }
  402.   if (document.all) {
  403.     document.all(lname).style.color = color 
  404.     document.all(lname).style.fontSize = size 
  405.     document.all(lname).style.fontFamily = font 
  406.     document.all(lname).style.fontStyle = style 
  407.     document.all(lname).style.fontWeight = weight
  408.     document.all(lname).innerHTML=str 
  409.   }
  410.   if (document.getElementById) {
  411.     document.getElementById(lname).style.color = color 
  412.     document.getElementById(lname).style.fontSize = size 
  413.     document.getElementById(lname).style.fontFamily = font 
  414.     document.getElementById(lname).style.fontStyle = style 
  415.     document.getElementById(lname).style.fontWeight = weight
  416.     document.getElementById(lname).innerHTML = str 
  417.   }
  418. }  
  419.  
  420. function na_resize_layer(lname, w, h) 
  421. // Resize Layer
  422. // img, a, select, button, timeline, layer
  423. // 'Target Layer' LAYER, 'Width' NUM 200, 'Height' NUM 200
  424. // Resizes a layer to the specified size.
  425. {
  426.   if (document.layers) 
  427.     document.layers[lname].resizeTo(w,h);
  428.   if (document.all) 
  429.     document.all[lname].style.width = w;
  430.     document.all[lname].style.height = h;
  431. }
  432.  
  433. function na_wipe_clip(lname, stT, stR, stB, stL, color, endT, endR, endB, endL, step) {
  434. // Wipe Layer
  435. // body, a, img, layer
  436. // 'Target Layer' LAYER, 'Starting Top' NUM, 'Starting Right' NUM, 'Starting Bottom' NUM, 'Starting Left' NUM, 'Color' COLOR #000000, 'Ending Top' NUM, 'Ending Right' NUM ,'Ending Bottom' NUM, 'Ending Left' NUM, 'Step' NUM 10
  437. // Makes a crawling effect of a layer. Specify starting/ending rectangles.
  438.  
  439.  if (!document.wipIniFlag) { 
  440.     document.wiptID = setTimeout('',1);
  441.     document.wipIniFlag = false;
  442.     document.t = stT;
  443.     document.r = stR;
  444.     document.b = stB;
  445.     document.l = stL;
  446.     stepT=(Math.max(document.t,endT) - Math.min(document.t,endT))/step;
  447.     stepR=(Math.max(document.r,endR) - Math.min(document.r,endR))/step;
  448.     stepB=(Math.max(document.b,endB) - Math.min(document.b,endB))/step;
  449.     stepL=(Math.max(document.l,endL) - Math.min(document.l,endL))/step;
  450.     clipvalue  = document.t+','+document.r+','+document.b+','+document.l+',"'
  451.     clipvalue += color+'",'
  452.     clipvalue += endT+','+endR+','+endB+','+endL+','+step
  453.     if (document.layers)
  454.       document.layers[lname].bgColor=color;
  455.     if (document.all)
  456.       document.all(lname).style.backgroundColor=color;
  457.       document.wipIniFlag=true;
  458.    }
  459.    if (document.t > endT)
  460.      document.t -= stepT;
  461.    if (document.r < endR)
  462.      document.r += stepR;
  463.    if (document.b < endB)
  464.      document.b += stepB;
  465.    if (document.l > endL)
  466.      document.l -= stepL;
  467.    if (!(document.t > endT) &&! (document.r < endR) &&! (document.b < endB) &&!(document.l > endL)) {
  468.        clearTimeout(document.wiptID);
  469.      }
  470.      else {
  471.        document.wiptID=setTimeout('na_wipe_clip("'+lname+'",'+clipvalue+')',10);
  472.      }
  473.  
  474.      if (document.all) {  
  475.        with (document.all(lname).style) {
  476.          if (pixelWidth < document.r)
  477.        pixelWidth = document.r;
  478.          if(pixelHeight < document.b)
  479.        pixelHeight = document.b;
  480.        }
  481.      }
  482.      if (document.layers) {
  483.        with(document.layers[lname].clip) {
  484.          top=document.t;
  485.      right = document.r;
  486.      bottom = document.b;
  487.      left = document.l;
  488.        }
  489.      }
  490.      if (document.all) {  
  491.        document.all(lname).style.clip ='rect('+document.t+','+document.r+','+document.b+','+document.l+')';
  492.     }
  493. }
  494.  
  495. function na_tooltip_layer(lname, str, bgclor, c_x, c_y, color, font, size, style, weight)
  496. // Make Layer Tooltip
  497. // img, a
  498. // 'Target Layer' LAYER, 'Message' TEXT, 'Background Color' COLOR #FFFFFF, 'Client X' NUM, 'Client Y' NUM, 'Font Color' COLOR #000000, 'Font' FONT, 'Font Size (pt)' NUM 12, 'Font Style' TEXTCOMBO 'normal' 'italic' 'oblique', 'Font Weight' TEXTCOMBO 'normal' 'bold' 'bolder' 'lighter' 100 200 300 400 500 600 700 800 900  
  499. // Makes a tooltip that describes the designated layer (Internet Explorer Compatible).
  500. {
  501.   document.all(lname).style.visibility = "visible" ; 
  502.   document.all(lname).style.positionr = "absolute"; 
  503.   document.all(lname).style.left = event.clientX+c_x; 
  504.   document.all(lname).style.top = event.clientY+c_y;
  505.   document.all(lname).style.color = color; 
  506.   document.all(lname).style.fontSize = size; 
  507.   document.all(lname).style.fontFamily = font; 
  508.   document.all(lname).style.fontStyle = style; 
  509.   document.all(lname).style.fontWeight = weight;
  510.   document.all(lname).style.backgroundColor = bgclor;
  511.   document.all(lname).innerHTML = str; 
  512. }
  513.  
  514. function na_change_image_size(image_name, w, h) 
  515. // Resize Image
  516. // img, a, select, button, layer
  517. // 'Image Name' IMG, 'Width' NUM 200, 'Height' NUM 200
  518. // Resizes the image to the size you specify (Internet Explorer Compatible).
  519. {
  520.   document[image_name].width = w;
  521.   document[image_name].height = h;
  522. }
  523.  
  524. function na_break_frame()
  525. // Break Frame
  526. // body 
  527. //
  528. // Prevents the current page from opening in a frame. Opens only in the whole browser window.
  529. {
  530.   if (window != top) top.location.href = location.href;
  531. }
  532.  
  533. function na_two_frame(fname1, url1, fname2, url2) 
  534. // Update Two Frames
  535. // img, a, select, button, timeline, layer
  536. // 'Frame 1' TEXT, 'URL1' FILE htm html, 'Frame 2' TEXT, 'URL 2' FILE htm html
  537. // Updates the contents of two frames at once.
  538. {
  539.   parent[fname1].location.href = url1;
  540.   parent[fname2].location.href = url2;
  541. }
  542.  
  543. function na_three_frame(fname1, url1, fname2, url2, fname3, url3)
  544. // Update Three Frames
  545. // img, a, select, button, timeline, layer
  546. // 'Frame 1' TEXT, 'URL 1' FILE htm html, 'Frame 2' TEXT, 'URL 2' FILE htm html, 'Frame 3' TEXT, 'URL 3' FILE htm html
  547. // Updates the contents of three frames at once.
  548. {
  549.   parent[fname1].location.href = url1;
  550.   parent[fname2].location.href = url2;
  551.   parent[fname3].location.href = url3;
  552. }
  553.  
  554. function na_parent_frame(url) 
  555. // Merge Frames
  556. // img, a, select, button, timeline, layer
  557. // 'URL' FILE htm html
  558. // Opens a new URL in the current window without frames.
  559. {
  560.   parent.location.href = url;
  561. }
  562.  
  563. function na_resize_by_win(offsetXPx, offsetYPx, oj)
  564. // Resize Window by
  565. // img, a, select, button, timeline, layer 
  566. // 'Offset X' NUM 200, 'Offset Y' NUM 200
  567. // Resizes Window by the amount of value you specify.
  568. {
  569.   if (document.layers || document.all) {
  570.        if (!oj)  
  571.          oj = self
  572.          oj.resizeBy (offsetXPx, offsetYPx)
  573.          if (document.layers)
  574.            oj.location.reload(0) 
  575.   }
  576. }
  577.  
  578. function na_resize_to_win(widthPx, heightPx, oj)
  579. // Resize Window to
  580. // img, a, select, button, timeline, layer 
  581. // 'Width' NUM 500, 'Height' NUM 500
  582. // Resizes window to the size you specify.
  583. {
  584.     if(document.all) {  
  585.       var nw = navigator.userAgent.indexOf('Win')
  586.       var nm = navigator.userAgent.indexOf('Mac')
  587.       var nu = navigator.userAgent.indexOf('X11')
  588.       if (nw!=-1) {
  589.         widthPx+=12;heightPx+=137}
  590.       if (nm!=-1) { 
  591.         widthPx+=0;heightPx-=0}
  592.       if (nu!=-1) { 
  593.         widthPx+=0;heightPx-=0}
  594.     }
  595.     if(document.layers || document.all) {      
  596.       if (!oj) 
  597.         oj = self
  598.       oj.resizeTo(widthPx, heightPx)
  599.       if (nm!=-1)
  600.         oj.location.reload(0) 
  601.    }
  602. }
  603.  
  604. function na_delay_url(url, delay_sec) 
  605. // Open URL After Delay
  606. // body, img, a, select, button, timeline, layer 
  607. // 'URL' FILE htm html, 'Delay Time (Second)' NUM 3 
  608. // Moves to a new URL after a delay time that you specify. 
  609. {
  610.   setTimeout("top.location.href = '" + url + "'", delay_sec*1000);
  611. }
  612.  
  613. function na_must_visit(visit_site, must_visit_site)
  614. // Open Sponsor Window
  615. // img, a, select, button, layer 
  616. // 'Target URL' FILE htm html , 'Sponsor URL' FILE htm html
  617. // Opens an additional window that you want the visitor to visit.
  618. {
  619.   window.open(must_visit_site);
  620.   window.location = visit_site;
  621. }
  622.  
  623. function na_full_win(url) 
  624. // Open Full Window
  625. // body, img, a, select, button, timeline, layer 
  626. // 'URL' FILE htm html 
  627. // Opens a full screen window without toolbars, status bar, or anything else attached.
  628. {
  629.   window.open (url,"", "fullscreen, scrollbars")
  630. }
  631.  
  632. function na_shake_window(n) 
  633. // Shake Windows
  634. // body, img, a, select, button, layer
  635. // 'Number of Shaking Times' NUM 5
  636. // Shakes the window as many times as you specify.
  637. {
  638.   netscape = (navigator.appName == "Netscape");
  639.   n4 = netscape && (parseInt(navigator.appVersion) >= 4);
  640.   explorer = (navigator.appName == "Microsoft Internet Explorer");
  641.   ie4 = explorer && (parseInt(navigator.appVersion) >= 4);
  642.  
  643.   if (n4 || ie4) {
  644.     for (i = 10; i > 0; i--) {
  645.       for (j = n; j > 0; j--) {
  646.         self.moveBy(0,i);
  647.         self.moveBy(i,0);
  648.         self.moveBy(0,-i);
  649.         self.moveBy(-i,0);
  650.       }
  651.     }
  652.   }
  653. }
  654.  
  655. function na_scroll_window(n, dir)
  656. // Scroll Page
  657. // body, img, a, button, layer 
  658. // 'Length (Pixel)' NUM 200, 'Direction' NUMCOMBO 'Up' 'Down'   
  659. // Scrolls the web page by the amount you specify. 
  660. {
  661.  var n;
  662.  var dir;
  663.   if (dir == 1)
  664.    {
  665.       for (i = 1; i <= n; i++)         
  666.       parent.scroll(1,i);
  667.    }    
  668.   else if (dir == 0)
  669.   {
  670.     for (i = n; i >= 1; i--)
  671.      {
  672.        parent.scroll(n,i);
  673.      }
  674.   }
  675. }
  676.  
  677. function na_window_close()
  678. // Close Window
  679. // body, img, a, select, button, timeline, layer
  680. //
  681. // Closes the current window.
  682. {
  683.   window.close();
  684. }
  685.  
  686. function na_animate_win_open(windowWidth, windowHeight, targetWidth, targetHeight, widthMod, heightMod) 
  687. // Spreading Window
  688. // body
  689. // 'Initial Width' NUM 10, 'Initial Height' NUM 10, 'Target Width' NUM 400, 'Target Height' NUM 400, 'Width Speed' NUM 2, 'Height Speed' NUM 2 
  690. // Opens the window by gradually enlarging the window size. 
  691. {
  692.   if (windowWidth < targetWidth) 
  693.     windowWidth += widthMod;
  694.   if (windowHeight < targetHeight) 
  695.     windowHeight += heightMod;
  696.   windowLeft = (screen.availWidth / 2) - (windowWidth / 2);
  697.   windowTop = (screen.availHeight / 2) - (windowHeight / 2);
  698.  
  699.   top.window.resizeTo(windowWidth,windowHeight);
  700.   top.window.moveTo(windowLeft, windowTop);
  701.  
  702.   if (windowWidth < targetWidth || windowHeight < targetHeight) 
  703.     setTimeout('na_animate_win_open(' + windowWidth + ', ' + windowHeight + ', ' + targetWidth + ', ' + targetHeight + ', ' + widthMod + ', ' + heightMod + ');',10);
  704. }
  705.  
  706. function na_note_window (title, width, height,  message, colorBack, back, textColor, typeFont, sizeFont) 
  707. // Open Message Window
  708. // img, a, layer
  709. // 'Title' TEXT, 'Width' NUM 400, 'Height' NUM 400, 'Message' TEXT, 'Background Color' COLOR #FFFFFF, 'BackgroundImage' FILE, 'Text Color' COLOR #000000, 'Font' FONT, 'Font Size (pt)' NUM 12
  710. // Pops up a window that contains message with style.
  711. {
  712.   windowNote = window.open('','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,' + 'width='+width+'' + ',height='+height+'');
  713.  text = '<' + 'HTML' + '><' + 'HEAD' + '><' + 'TITLE' + '>' + title + '</' + 'TITLE' + '><' + '/HEAD' + '><' + 'BODY BACKGROUND=' + '"' + back + '"' + ' BGCOLOR=' + '"' + colorBack + '">';
  714.   text += '<CENTER>';
  715.   text += '<span style= "font-size:' +sizeFont+  'pt;">';
  716.   text +='<FONT FACE="' + typeFont +'"';
  717.   text += ' COLOR=' + '"' + textColor +'">';
  718.   text += message + '</CENTER></FONT>';
  719.   text += '</span>';
  720.   text += '</' + 'BODY' + '><' + '/HTML' + '>';
  721.   windowNote.document.write(text);
  722.   windowNote.focus();
  723.   windowNote.document.close();
  724.   return false;
  725. }
  726.  
  727. function na_reload_win() 
  728. // Reload Window
  729. // img, a, select, button, layer
  730. //
  731. // Reloads the current page
  732. {
  733.   document.location.reload()
  734. }
  735.  
  736. function na_reload_intervals(na_re_sec) 
  737. // Reload at intervals
  738. // body
  739. // 'Intervals (Second)' NUM 5
  740. // Reloads the current page at specified intervals.
  741. {
  742.  setTimeout("history.go(0)", na_re_sec*1000);
  743. }
  744.  
  745. function na_redirect_alert(str, url)
  746. // Redirect with Alert Message
  747. // body, img, a, select, button, layer 
  748. // 'Message' TEXT, 'URL' FILE htm html
  749. // Redirects the visitor to a new URL with an alert message.
  750. {
  751.   alert(str);
  752.   location = url;
  753. }
  754.  
  755. function na_change_location(url) 
  756. // Change URL of Window
  757. // img, a, select, button, timeline, layer 
  758. // 'URL' FILE htm html 
  759. // Moves to a new URL without opening a new window
  760. {
  761.   location=url;
  762. }
  763.  
  764. function na_redirect_by_resolution(url_640x480, url_800x600, url_1024x768, other) 
  765. // Redirect By Screen Resolution
  766. // body 
  767. // '640x480' FILE htm html,'800x600' FILE htm html, '1024x768' FILE htm html, 'Other' FILE htm html
  768. // Redirects the visitor according to the screen resolution
  769. {
  770.   var url_640x480;   
  771.   var url_800x600;   
  772.   var url_1024x768;
  773.   if (screen.width==640||screen.height==480)
  774.     window.location.replace(url_640x480)    
  775.   else if (screen.width == 800 ||screen.height == 600)
  776.     window.location.replace(url_800x600);
  777.   else if (screen.width == 1024||screen.height == 768)  
  778.     window.location.replace(url_1024x768);
  779.   else 
  780.     window.location.replace(other);
  781. }
  782.  
  783. function na_os_sniffer(macURL, linuxURL, winURL)
  784. // Redirect by Operating System
  785. // body 
  786. // 'MacURL' FILE htm html, 'LinuxURL' FILE htm html, 'WinURL' FILE htm html
  787. // Redirects the visitor according to the operating system
  788. {
  789.   var agt = navigator.userAgent.toLowerCase();
  790.   var is_major = parseInt(navigator.appVersion);
  791.   var is_minor = parseFloat(navigator.appVersion);
  792.   var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) &&
  793.                 (agt.indexOf('compatible')== -1) && (agt.indexOf('opera')==-1)
  794.                 && (agt.indexOf('webtv')==-1));
  795.   var is_mac = (agt.indexOf("mac")!=-1); 
  796.   var is_linux = (agt.indexOf("linux")!=-1);
  797.   var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
  798.   var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));
  799.   var is_win16 = ((agt.indexOf("win16")!=-1) || 
  800.                    (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
  801.                (agt.indexOf("windows 16-bit")!=-1) );  
  802.   var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
  803.                     (agt.indexOf("windows 16-bit")!=-1));
  804.   var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
  805.   var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
  806.   var is_win32 = (is_win95 || is_winnt || is_win98 || 
  807.                     ((is_major >= 4) && (navigator.platform == "Win32")) ||
  808.                     (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));
  809.   if (is_mac) { 
  810.     location.href = macURL;
  811.   } 
  812.    
  813.   else if (is_linux) { 
  814.     location.href = linuxURL;
  815.   }
  816.   else if (is_win || is_win95 || is_win98 || is_winnt || is_win31 || is_win32 || is_win16) { 
  817.     location.href = winURL; 
  818.   }
  819. }
  820.  
  821. function na_rotate_window(r, number, x_value, y_value)
  822. // Rotate Window
  823. // body
  824. // 'Radius' NUM 20, 'Number of Rotation' NUM 3, 'Offset X' NUM, 'Offset Y' NUM 
  825. // Rotates the window, and places the window to the position you specify in the end.
  826.  
  827.  {
  828.   for ( var i = 0; i < number*360; i++) {
  829.     x = (r * Math.cos((i * Math.PI)/180)) + x_value;
  830.     y = (r * Math.sin((i * Math.PI)/180)) + y_value;
  831.     self.moveTo(x,y); 
  832.     }
  833. }
  834.  
  835. function na_email_validation(fname, type_name, str) 
  836. // Validate Email
  837. // text
  838. // 'Form Name' FORM, 'Form Field Name' FORMFIELD, 'Message' TEXT
  839. // Checks if the e-mail is valid.
  840. {
  841.   var email_validation = true
  842.   var temp = document.forms[fname].elements[type_name]
  843.   var at = temp.value.indexOf('@')
  844.   var prd = temp.value.lastIndexOf('.')
  845.   var space = temp.value.indexOf(' ')
  846.   var length = temp.value.length - 1   
  847.  
  848.   if ((at < 1) || (prd <= at+1) ||  (prd == length ) ||  (space  != -1)) {  
  849.     email_validation = false
  850.     alert(str)
  851.     temp.focus()
  852.   }
  853.   return email_validation
  854. }
  855.  
  856. function na_null_validate(fname, tname, str)
  857. // Null Validation of Form Field 
  858. // text
  859. // 'Form Name' FORM, 'Form Field Name' FORMFIELD, 'Message' TEXT
  860. // Check whether a specific text form field is blank or not.
  861. {
  862.   f_name = document[fname]
  863.   elemnt_name = f_name[tname].value
  864.   if (elemnt_name == "")    {
  865.     alert(str)
  866.     return false
  867.   }
  868. }
  869.  
  870. function na_number_validate (fname, type_name, str) 
  871. // Number Validation
  872. // text
  873. // 'Form Name' FORM, 'Form Field Name' FORMFIELD, 'Message' TEXT
  874. // Checks whether the value in the text field is number or not.
  875. {
  876.   num_Val = document.forms[fname].elements[type_name].value
  877.   var numStr = "0123456789";
  878.   var thisChar;
  879.   var counter = 0;
  880.     for (var n = 0; n < num_Val.length; n++) {
  881.       thisChar = num_Val.substring(n, n+1);
  882.       if (numStr.indexOf(thisChar) != -1)
  883.         counter ++;
  884.       }
  885.   if (counter == num_Val.length) 
  886.     return true;
  887.   else 
  888.     alert(str);    
  889.     return false;
  890. }
  891.  
  892. function na_check_max_length(fname, type_name, str, maxlength)
  893. // Restrict Text Length
  894. // text
  895. // 'Form Name' FORM, 'Form Field Name' FORMFIELD, 'Message' TEXT, 'Max Length' NUM 5   
  896. // Restricts the number of characters in the text form field.
  897. {
  898.   var maxlength;
  899.   if (document.forms[fname].elements[type_name].value.length > maxlength) {
  900.     alert(str);
  901.   return false
  902.   } 
  903. }
  904.  
  905. function na_set_focus(form_name, type_name) 
  906. // Move Focus to
  907. // body, text
  908. // 'Form Name' FORM, 'Form Field Name' FORMFIELD
  909. // Moves the focus to the form field you specify.
  910. {
  911.   document[form_name][type_name].focus()
  912. }
  913.  
  914. function na_form_clear(fname, type_name) 
  915. // Reset Form Field
  916. // select, text, textarea 
  917. // 'Form Name' FORM, 'Form Field Name' FORMFIELD
  918. // Clears the specific text form field.
  919. {
  920.   if (document.forms[fname].elements[type_name].value = document.forms[fname].elements[type_name].defaultValue) {
  921.     document.forms[fname].elements[type_name].value = "";
  922.   }
  923. }
  924.  
  925. function na_form_validation(fname ,str)
  926. // Validate Form 
  927. // text, button
  928. // 'Form Name' FORM, 'Message' TEXT
  929. // Validates if the text field values in the form are blank or not.
  930. {
  931.   var x = 0
  932.   var form_validation  = true
  933.   while ((x < document.forms[fname].elements.length) && (form_validation) ) {
  934.     if (document.forms[fname].elements[x].value == '') { 
  935.       alert(str)
  936.       document.forms[fname].elements[x].focus()
  937.       form_validation = false 
  938.     }
  939.       x ++
  940.   }
  941.   return form_validation
  942. }
  943.  
  944. function na_select_form (fname, type_name) 
  945. // Select Text
  946. // a, select, text, button, textarea 
  947. // 'Form Name' FORM, 'Form Field Name' FORMFIELD 
  948. // Selects the entire text entered in a specific text form field. 
  949. {
  950.   document.forms[fname].elements[type_name].select()
  951.   document.forms[fname].elements[type_name].focus()
  952. }
  953.  
  954. function na_custom_print() 
  955. // Print Document
  956. // body, img, a, select, button, layer
  957. //
  958. // Print Document as if the browser's print button had been clicked. 
  959. {
  960.   if (document.all) {
  961.     if (navigator.appVersion.indexOf("5.0") == -1) {
  962.       var OLECMDID_PRINT = 6;
  963.       var OLECMDEXECOPT_DONTPROMPTUSER = 2;
  964.       var OLECMDEXECOPT_PROMPTUSER = 1;
  965.       var WebBrowser = "<OBJECT ID=\"WebBrowser1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>";
  966.       document.body.insertAdjacentHTML("beforeEnd", WebBrowser);
  967.       WebBrowser1.ExecWB(6, 2);
  968.       WebBrowser1.outerHTML = "";
  969.     } else {
  970.            self.print();
  971.        }
  972.     } else {
  973.        self.print();
  974.     }
  975. }
  976.  
  977. function na_no_right_click(message)
  978. // Prevent Right-click
  979. // body 
  980. // 'Message' TEXT
  981. // Prevents right-mouse click event from functioning.
  982. {
  983.   var message; 
  984.   function click(e) {
  985.     if (document.all) {
  986.       if (event.button == 2) {
  987.         alert(message);
  988.       return false;
  989.       }
  990.     }
  991.     if (document.layers) {
  992.       if (e.which == 3) {
  993.         alert(message);
  994.         return false;
  995.       }
  996.     }
  997.   }
  998.   if (document.layers) {
  999.     document.captureEvents(Event.MOUSEDOWN);
  1000.   }
  1001.   document.onmousedown= click;
  1002. }
  1003.  
  1004. function na_change_bgcolor(color) 
  1005. // Set Background Color 
  1006. // img, a, select, button, timeline, layer
  1007. // 'Color' COLOR #FFFFFF
  1008. // Sets the background color of the document.
  1009. {
  1010.    document.bgColor=color;
  1011. }
  1012.  
  1013. function na_bground_img_change(img)
  1014. // Set Background Image  
  1015. // img, a, select, button, timeline, layer
  1016. // 'Image' FILE 
  1017. // Sets the background image of the document (Internet Explorer Compatible). 
  1018.  {
  1019.   var img;
  1020.  
  1021.   if (navigator.appName=="Microsoft Internet Explorer") {
  1022.      document.body.background=img;
  1023.   }
  1024. }
  1025.  
  1026. function na_windows_media_play(id) 
  1027. // Play Windows Media Player 
  1028. // img, a, select, button, layer
  1029. // 'ID' TEXT MediaPlayer1
  1030. // Plays Windows Media Player embedded in Document (Internet Explorer Compatible).
  1031. {
  1032.   document.all[id].play()
  1033. }
  1034.  
  1035. function na_windows_media_stop(id)
  1036. // Stop Windows Media Player
  1037. // img, a, select, button, layer
  1038. // 'ID' TEXT MediaPlayer1
  1039. // Stops Windows Media Player embedded in Document (Internet Explorer Compatible).
  1040. {
  1041.   document.all[id].stop()
  1042. }
  1043.  
  1044. function na_windows_media_pause(id)
  1045. // Pause Windows Media Player
  1046. // img, a, select, button, layer
  1047. // 'ID' TEXT MediaPlayer1
  1048. // Pauses Windows Media Player embedded in Document (Internet Explorer Compatible).
  1049. {
  1050.   document.all[id].pause()
  1051.  
  1052. function na_last_update(lname, color, size, font, style, weight)
  1053. // Write Last Update Information to Layer
  1054. // body
  1055. // 'Target Layer' LAYER, 'Font Color' COLOR #000000, 'Font Size (pt)' NUM 12, 'Font' FONT, 'Font Style' TEXTCOMBO 'normal' 'italic' 'oblique', 'Font Weight' TEXTCOMBO 'normal' 'bold' 'bolder' 'lighter' 100 200 300 400 500 600 700 800 900 
  1056. // Displays the last update information in the layer you specify.
  1057. {
  1058.  var str =document.lastModified;
  1059. if (document.layers) { 
  1060.   with(document.layers[lname]) {
  1061.     document.open()
  1062.     document.write(str)
  1063.     document.fgColor = color
  1064.     document.close();
  1065.    }
  1066.   }
  1067.   if (document.all) {
  1068.     document.all(lname).style.color = color 
  1069.     document.all(lname).style.fontSize = size 
  1070.     document.all(lname).style.fontFamily = font 
  1071.     document.all(lname).style.fontStyle = style 
  1072.     document.all(lname).style.fontWeight = weight
  1073.     document.all(lname).innerHTML = str 
  1074.   }
  1075. }
  1076.  
  1077. function na_blink(speed) 
  1078. // Blink Effect
  1079. // body
  1080. // 'Frequency' NUM 2
  1081. // Makes the window blink at a specific speed.
  1082. {
  1083.   if (speed) {
  1084.     if (document.all)
  1085.       setInterval("na_blink()", speed*1000)
  1086.     return;
  1087.   }
  1088.   var blink = document.all.tags("BLINK") 
  1089.   for (var i=0; i<blink.length; i++)
  1090.     blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
  1091. }
  1092.  
  1093. function na_object_show(obj)
  1094. // Show Object
  1095. // img, a, select, button, timeline, layer 
  1096. // 'Object ID' TEXT 
  1097. // Makes the specified object visible (Internet Explorer Compatible).
  1098. {
  1099.   if(document.layers)
  1100.     document.layers[obj].visibility = 'show'
  1101.   if(document.all)
  1102.     document.all(obj).style.visibility = 'visible'
  1103. }
  1104.  
  1105. function na_object_hide(obj) 
  1106. // Hide Object
  1107. // img, a, select, button, timeline, layer 
  1108. // 'Object ID' TEXT 
  1109. // Makes the specified object invisible (Internet Explorer Compatible).
  1110. {
  1111.   if(document.layers)
  1112.     document.layers[obj].visibility ='hide'
  1113.   if(document.all)
  1114.     document.all(obj).style.visibility ='hidden'
  1115. }
  1116.  
  1117. function na_remove_filter(lname)
  1118. // Remove Filter Effect
  1119. // img, a, select, button, timeline, layer
  1120. // 'Target Layer' LAYER
  1121. // Removes the filter effect applied to the specific object (Internet Explorer Compatible).
  1122. {
  1123.   document.all[lname].style.filter=" "
  1124. }
  1125.  
  1126. function na_alpha_filter(lname, f_style, f_opacity, f_f_opacity, f_startx, f_starty, f_finishx, f_finishy) 
  1127. // Apply Alpha Effect
  1128. // body, img, a, select, button, timeline, layer
  1129. // 'Target Layer' LAYER, 'Style' NUMCOMBO '0 - Uniform' '1 - Linear' '2 - Radial' '3 - Rectangular', 'Opacity' NUM 100, 'Finish Opacity' NUM 0, 'Start X' NUM 0, 'Start Y' NUM 0, 'Finish X' NUM 100, 'Finish Y' NUM 100
  1130. // Sets the opactiy of a specific object (Internet Explorer5.5 Compatible). 
  1131. {
  1132.   document.all[lname].style.filter="alpha(style ="+f_style+", opacity="+f_opacity+", finishopacity="+f_f_opacity+", startx ="+f_startx+", starty ="+f_starty+", finishx ="+f_finishx+", finishy ="+f_finishy+")"
  1133. }
  1134.  
  1135. function na_blur_filter(lname, f_PixelRadius, f_MakeShadow, f_ShadowOpacity_value) 
  1136. // Apply Blur Effect
  1137. // body, img, a, select, button, timeline, layer
  1138. // 'Target Layer' LAYER, 'Pixel Radius' NUM 2, 'Make Shadow' BOOL, 'Shadow Opacity (%)' NUM 50
  1139. // Controls the blurriness of a specific object (Internet Explorer5.5 Compatible). 
  1140. {
  1141.   var f_ShadowOpacity = f_ShadowOpacity_value/100;
  1142.   if (f_MakeShadow == false) {
  1143.     document.all[lname].style.filter="progid:DXImageTransform.Microsoft.blur(PixelRadius="+f_PixelRadius+", MakeShadow=false)"
  1144.   }
  1145.   else if (f_MakeShadow == true) {
  1146.     document.all[lname].style.filter="progid:DXImageTransform.Microsoft.blur(PixelRadius="+f_PixelRadius+", MakeShadow=true, ShadowOpacity="+f_ShadowOpacity+")"
  1147.   }
  1148. }
  1149.  
  1150. function na_chroma(lname, f_color) 
  1151. // Apply Chroma Effect
  1152. // body, img, a, select, button, timeline, layer
  1153. // 'Target Layer' LAYER, 'Color' COLOR #CCCCCC
  1154. // Changes a specific color within an object transparent (Internet Explorer5.5 Compatible). 
  1155. {
  1156.   document.all[lname].style.filter="chroma(color="+f_color+")"
  1157. }
  1158.  
  1159. function na_dropshadow(lname , f_color, f_offx, f_offy, f_positive)
  1160. // Apply Dropshadow Effect
  1161. // body, img, a, select, button, timeline, layer
  1162. // 'Target Layer' LAYER, 'Color' COLOR #CCCCCC, 'Offset X' NUM 5, 'Offset Y' NUM 5 
  1163. // Applies a shadow that makes an object look floated (Internet Explorer5.5 Compatible). 
  1164. {
  1165.   document.all[lname].style.filter="dropshadow(color="+f_color+", offx ="+f_offx+", offy ="+f_offy+", positive ="+f_positive+")"
  1166. }
  1167.  
  1168. function na_fliph_filter(lname) 
  1169. // Apply Fliph Effect
  1170. // body, img, a, select, button, timeline, layer
  1171. // 'Target Layer' LAYER
  1172. // Creates a horizontal mirror image effect of the object (Internet Explorer5.5 Compatible).  
  1173. {
  1174.   document.all[lname].style.filter="fliph"
  1175. }
  1176.  
  1177. function na_flipv_filter(lname) 
  1178. // Apply Flipv Effect
  1179. // body, img, a, select, button, timeline, layer
  1180. // 'Target Layer' LAYER
  1181. // Creates a vertical mirror image effect of the object (Internet Explorer5.5 Compatible).  
  1182. {
  1183.   document.all[lname].style.filter="flipv"
  1184. }
  1185.  
  1186. function na_glow_filter(lname, f_color, f_strength) 
  1187. // Apply Glow Effect
  1188. // body, img, a, select, button, timeline, layer
  1189. // 'Target Layer' LAYER, 'Color' COLOR #CCCCCC, 'Strength' NUM 5
  1190. // Makes a glow around the object (Internet Explorer5.5 Compatible). 
  1191. {
  1192.   document.all[lname].style.filter="glow(color="+f_color+", strength ="+f_strength+")"
  1193. }
  1194.  
  1195. function na_gray_filter(lname) 
  1196. // Apply Gray Effect
  1197. // body, img, a, select, button, timeline, layer
  1198. // 'Target Layer' LAYER
  1199. // Changes an object to monochromatic colors (Internet Explorer5.5 Compatible).  
  1200. {
  1201.   document.all[lname].style.filter="gray"
  1202. }
  1203.  
  1204. function na_invert_filter(lname) 
  1205. // Apply Invert Effect
  1206. // body, img, a, select, button, timeline, layer
  1207. // 'Target Layer' LAYER
  1208. // Reverses all hue, saturation and brightness values of an object (Internet Explorer5.5 Compatible).  
  1209. {
  1210.   document.all[lname].style.filter="invert"
  1211. }
  1212.  
  1213. function na_mask_filter(lname, f_color) 
  1214. // Apply Mask Effect
  1215. // body, img, a, select, button, timeline, layer
  1216. // 'Target Layer' LAYER, 'Color' COLOR #CCCCCC
  1217. // Displays transparent part of the object as a color mask, and makes the nontransparent part transparent (Internet Explorer5.5 Compatible). 
  1218. {
  1219.   document.all[lname].style.filter="progid:DXImageTransform.Microsoft.MaskFilter(color="+f_color+")"
  1220. }
  1221.  
  1222. function na_motionblur_filter(lname, f_direction, f_strength) 
  1223. // Apply Motionblur Effect
  1224. // body, img, a, select, button, timeline, layer
  1225. // 'Target Layer' LAYER, 'Direction' NUM 270, 'Strength' NUM 5
  1226. // Causes the content of the object to appear to be in motion (Internet Explorer5.5 Compatible). 
  1227. {
  1228.   document.all[lname].style.filter="blur(direction ="+f_direction+", strength ="+f_strength+")"
  1229. }
  1230.  
  1231. function na_shadow_filter(lname, f_color, f_direction) 
  1232. // Apply Shadow Effect
  1233. // body, img, a, select, button, timeline, layer
  1234. // 'Target Layer' LAYER, 'Color' COLOR #CCCCCC, 'Direction' NUM 270
  1235. // Applies shadow to an object (Internet Explorer5.5 Compatible). 
  1236. {
  1237.   document.all[lname].style.filter="shadow(color="+f_color+", direction ="+f_direction+")"
  1238. }
  1239.  
  1240. function na_wave_filter(lname, f_add, f_freq, f_lightstrength, f_phase, f_strength) 
  1241. // Apply Wave Effect
  1242. // body, img, a, select, button, timeline, layer
  1243. // 'Target Layer' LAYER, 'Add' BOOL, 'Freq' NUM 3, 'Light Strength' NUM 100, 'Phase' NUM 0, 'Strength' NUM 5
  1244. // Performs a sine wave distortion of the content of the object along the vertical axis (Internet Explorer5.5 Compatible).  
  1245. {
  1246.   var f_add_value;
  1247.   if (f_add == true) {
  1248.     f_add_value = 'true'
  1249.   }
  1250.   else if (f_add == false) {
  1251.     f_add_value = 'false'
  1252.   }
  1253.   document.all[lname].style.filter="progid:DXImageTransform.Microsoft.Wave(Add ="+f_add_value+", Freq="+f_freq+", LightStrength="+f_lightstrength+", Phase ="+f_phase+", Strength ="+f_strength+")"
  1254. }
  1255.  
  1256. function na_xray_filter(lname) 
  1257. // Apply Xray Effect
  1258. // body, img, a, select, button, timeline, layer
  1259. // 'Target Layer' LAYER
  1260. // Shows outline of an object (Internet Explorer5.5 Compatible).  
  1261. {
  1262.   document.all[lname].style.filter="xray"
  1263. }
  1264.  
  1265. function na_erase_statusbar(msg, er_speed) 
  1266. // Erasing Status Bar
  1267. // body
  1268. // 'Message' TEXT, 'Intervals (millisecond)' NUM 50
  1269. // Creates a text animation effect erasing at intervals in a status bar.  
  1270. {
  1271.   if (!document.na_erasestr) {
  1272.     document.na_erasestr = msg;
  1273.     document.comeback = 0
  1274.     document.cometo = 0
  1275.     document.er_spd = er_speed      
  1276.   }
  1277.   window.status = document.na_erasestr.substring(0, document.cometo)
  1278.   if(document.comeback == 1) {
  1279.     document.cometo--;
  1280.     if(document.cometo==0) {
  1281.       document.comeback=0
  1282.     }
  1283.   }
  1284.   else {
  1285.     document.cometo++;
  1286.   if (document.cometo == document.na_erasestr.length) {
  1287.     document.comeback = 1
  1288.   }
  1289.   }
  1290.   window.status = document.na_erasestr.substring(0, document.cometo)+"|"
  1291.   if(document.cometo == document.na_erasestr.length) {
  1292.     window.setTimeout("na_erase_statusbar()", document.er_spd);
  1293. }
  1294.   else {
  1295.     window.setTimeout("na_erase_statusbar()", document.er_spd/10);
  1296.   }
  1297. }
  1298.  
  1299. function na_flash_status(str, fla_speed) 
  1300. // Flashing Status Bar
  1301. // body
  1302. // 'Message' TEXT, 'Intervals (millisecond)' NUM 50
  1303. // Creates a text animation effect flashing at intervals in a status bar.  
  1304. {
  1305.   if(!document.str) {
  1306.     document.str = str;
  1307.     document.temp=1; 
  1308.     document.fla_spd = fla_speed
  1309.   }
  1310.   if (document.temp == 1) { 
  1311.     window.status =document.str;
  1312.     document.temp=0; 
  1313.   } 
  1314.   else { 
  1315.     window.status = ""; 
  1316.     document.temp=1; 
  1317.   } 
  1318.   setTimeout("na_flash_status()", document.fla_spd); 
  1319. }
  1320.  
  1321. function na_shoot_message(msg, sho_speed) 
  1322. // Shooting Status Bar
  1323. // body
  1324. // 'Message' TEXT, 'Intervals (millisecond)' NUM 50
  1325. // Creates a text animation effect shooting texts at intervals in a status bar.  
  1326. {
  1327.   if(!document.na_shoot_str) {
  1328.     document.na_shoot_str = "";
  1329.     document.na_shoot_init_msg =msg+" "; 
  1330.     document.na_shoot_msg = "" 
  1331.     document.na_shoot_leftmsg = ""      
  1332.     document.sho_spd = sho_speed          
  1333.   }
  1334.   if (document.na_shoot_msg == "") {
  1335.     document.na_shoot_str = " "         
  1336.     document.na_shoot_msg = document.na_shoot_init_msg    
  1337.     document.na_shoot_leftmsg = ""      
  1338.   }    
  1339.   if (document.na_shoot_str.length == 1) {
  1340.     while (document.na_shoot_msg.substring(0, 1) == " ") {
  1341.       document.na_shoot_leftmsg = document.na_shoot_leftmsg + document.na_shoot_str            
  1342.       document.na_shoot_str = document.na_shoot_msg.substring(0, 1)           
  1343.       document.na_shoot_msg = document.na_shoot_msg.substring(1, document.na_shoot_msg.length) 
  1344.     }
  1345.      document.na_shoot_leftmsg = document.na_shoot_leftmsg + document.na_shoot_str            
  1346.      document.na_shoot_str = document.na_shoot_msg.substring(0, 1)           
  1347.      document.na_shoot_msg = document.na_shoot_msg.substring(1, document.na_shoot_msg.length) 
  1348.       for (var ii = 0; ii < 120; ii++) {
  1349.         document.na_shoot_str = " " + document.na_shoot_str
  1350.       }           
  1351.     }
  1352.     else {
  1353.       document.na_shoot_str = document.na_shoot_str.substring(4, document.na_shoot_str.length) 
  1354.     }
  1355.     window.status = document.na_shoot_leftmsg + document.na_shoot_str
  1356.     setTimeout('na_shoot_message()', document.sho_spd)
  1357. }